import React, { Component } from 'react'
import { View, Text, Clipboard, TouchableOpacity } from 'react-native'
import { payTimeRules } from '../data'
import commonStyle from '../../../../libs/commonStyle'

export default class PayTimeRule extends Component {
	copy(text, tips) {
		Clipboard.setString(String(text))
		this.props.showTips && this.props.showTips(tips)
	}
	render() {
		const { wechat } = this.props.info
		return (
			<View>
				<Text style={[commonStyle.mb20]}>支付时间说明：</Text>
				<View>
					{payTimeRules.map(item => {
						return (
							<Text
								style={[
									commonStyle.colorGray,
									commonStyle.mb10,
									{ lineHeight: 20 }
								]}
							>
								{item}
							</Text>
						)
					})}
				</View>
				<TouchableOpacity
					onPress={() => {
						this.copy(wechat, '已复制客服微信')
					}}
				>
				<Text>
					如有提现问题请加客服微信：<Text style={[commonStyle.activeColor]}>
					{wechat}
				</Text>(点击可复制）
				</Text>
				
				</TouchableOpacity>
			</View>
		)
	}
}
